﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using FastMVVM.Core;
using FastMVVM.WP7.Template.Model;

namespace FastMVVM.WP7.Template.ViewModel
{
    public class MainPageViewModel : ViewModelBase
    {
        public event EventHandler ShowMessage;

        private Message _message;
        public Message Message
        {
            get { return _message; }
            set
            {
                _message = value;
                base.NotifyPropertyChanged("Message");
            }
        }

        public void LoadMessage()
        {
            Message = new Message("Hello World!");

            ShowMessage.Invoke(this, new EventArgs());
        }
    }
}
